// 回到顶部
<template>
  <div class="wrapper" @click="goTop">
    <div class="back-top">
      <i class="iconfont icon-to-top"></i>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    goTop () {
      window.scrollTo(0,0)
    }
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  .back-top {
    width: 36px;
    height: 36px;
    background: rgb(255, 255, 255);
    line-height: 36px;
    text-align: center;
    border-radius: 18px;
    box-shadow: 1px 1px 1px #ccc ;
    i.iconfont {
      font-size: 25px !important;
      color: rgb(114, 111, 111);
    }
  }
}
</style>